package com.yazi.mxz.behavior.repository;


import java.util.List;

import org.springframework.data.geo.Point;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.yazi.mxz.behavior.entity.repository.Region;

public interface RegionRepository extends MongoRepository<Region, Long> {
	
	Region findTop1ByLocationNear(Point location);
	List<Region> findByParentId(Long parentId);
	List<Region> findByParentIdOrderByRegionId(Long parentId);
	List<Region> findByNameLikeOrSpellIgnoreCaseLike(String name, String spell);
}
